<!DOCTYPE HTML>
<html lang="zh-tw" >
    <!-- Start book Flask框架 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>部署 | Flask框架</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-emphasize/plugin.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../c05/s04.html" />
    
    
    <link rel="prev" href="../c05/s02.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="5.3"
        data-chapter-title="部署"
        data-filepath="c05/s03.md"
        data-basepath=".."
        data-revision="Sat Oct 28 2017 17:13:14 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        引言
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="c01/index.html">
            
                
                    <a href="../c01/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        关于Flask
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="c01/s01.html">
            
                
                    <a href="../c01/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        了解框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="c01/s02.html">
            
                
                    <a href="../c01/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        安装环境
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="c02/index.html">
            
                
                    <a href="../c02/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        视图
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="c02/s01.html">
            
                
                    <a href="../c02/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        从Hello World开始
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="c02/s02.html">
            
                
                    <a href="../c02/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        扩展
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="c03/index.html">
            
                
                    <a href="../c03/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        模板
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="c03/s01.html">
            
                
                    <a href="../c03/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        变量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="c03/s02.html">
            
                
                    <a href="../c03/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        过滤器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="c03/s03.html">
            
                
                    <a href="../c03/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        web表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="c03/s04.html">
            
                
                    <a href="../c03/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        控制语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="c03/s05.html">
            
                
                    <a href="../c03/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        宏、继承、包含
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="c03/s06.html">
            
                
                    <a href="../c03/s06.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        Flask的特殊变量和方法
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="c04/index.html">
            
                
                    <a href="../c04/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        数据库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="c04/s01.html">
            
                
                    <a href="../c04/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        数据库的设置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="c04/s02.html">
            
                
                    <a href="../c04/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        数据库的基本操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="c04/s03.html">
            
                
                    <a href="../c04/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        自定义模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="c04/s04.html">
            
                
                    <a href="../c04/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        数据库迁移
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="c04/s05.html">
            
                
                    <a href="../c04/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        邮件扩展
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="c05/index.html">
            
                
                    <a href="../c05/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        测试与部署
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="c05/s01.html">
            
                
                    <a href="../c05/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        蓝图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="c05/s02.html">
            
                
                    <a href="../c05/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        单元测试
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="5.3" data-path="c05/s03.html">
            
                
                    <a href="../c05/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        部署
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="c05/s04.html">
            
                
                    <a href="../c05/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        RESTful
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="c05/s05.html">
            
                
                    <a href="../c05/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        性能
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    本書使用 GitBook 釋出
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >Flask框架</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="53-&#x90E8;&#x7F72;">5.3 &#x90E8;&#x7F72;</h1>
<p>&#x5F53;&#x6211;&#x4EEC;&#x6267;&#x884C;&#x4E0B;&#x9762;&#x7684;hello.py&#x65F6;&#xFF0C;&#x4F7F;&#x7528;&#x7684;flask&#x81EA;&#x5E26;&#x7684;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x5B8C;&#x6210;&#x4E86;web&#x670D;&#x52A1;&#x7684;&#x542F;&#x52A8;&#x3002;&#x5728;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x4E2D;&#xFF0C;flask&#x81EA;&#x5E26;&#x7684;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x65E0;&#x6CD5;&#x6EE1;&#x8DB3;&#x6027;&#x80FD;&#x8981;&#x6C42;&#xFF0C;&#x6211;&#x4EEC;&#x8FD9;&#x91CC;&#x91C7;&#x7528;Gunicorn&#x505A;wsgi&#x5BB9;&#x5668;&#xFF0C;&#x6765;&#x90E8;&#x7F72;flask&#x7A0B;&#x5E8F;&#x3002;Gunicorn&#xFF08;&#x7EFF;&#x8272;&#x72EC;&#x89D2;&#x517D;&#xFF09;&#x662F;&#x4E00;&#x4E2A;Python WSGI&#x7684;HTTP&#x670D;&#x52A1;&#x5668;&#x3002;&#x4ECE;Ruby&#x7684;&#x72EC;&#x89D2;&#x517D;&#xFF08;Unicorn &#xFF09;&#x9879;&#x76EE;&#x79FB;&#x690D;&#x3002;&#x8BE5;Gunicorn&#x670D;&#x52A1;&#x5668;&#x4E0E;&#x5404;&#x79CD;Web&#x6846;&#x67B6;&#x517C;&#x5BB9;&#xFF0C;&#x5B9E;&#x73B0;&#x975E;&#x5E38;&#x7B80;&#x5355;&#xFF0C;&#x8F7B;&#x91CF;&#x7EA7;&#x7684;&#x8D44;&#x6E90;&#x6D88;&#x8017;&#x3002;Gunicorn&#x76F4;&#x63A5;&#x7528;&#x547D;&#x4EE4;&#x542F;&#x52A8;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x7F16;&#x5199;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x76F8;&#x5BF9;uWSGI&#x8981;&#x5BB9;&#x6613;&#x5F88;&#x591A;&#x3002;</p>
<p>&#x533A;&#x5206;&#x51E0;&#x4E2A;&#x6982;&#x5FF5;&#xFF1A;</p>
<p><strong>WSGI&#xFF1A;</strong>&#x5168;&#x79F0;&#x662F;Web Server Gateway Interface&#xFF08;web&#x670D;&#x52A1;&#x5668;&#x7F51;&#x5173;&#x63A5;&#x53E3;&#xFF09;&#xFF0C;&#x5B83;&#x662F;&#x4E00;&#x79CD;&#x89C4;&#x8303;&#xFF0C;&#x5B83;&#x662F;web&#x670D;&#x52A1;&#x5668;&#x548C;web&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x4E4B;&#x95F4;&#x7684;&#x63A5;&#x53E3;&#x3002;&#x5B83;&#x7684;&#x4F5C;&#x7528;&#x5C31;&#x50CF;&#x662F;&#x6865;&#x6881;&#xFF0C;&#x8FDE;&#x63A5;&#x5728;web&#x670D;&#x52A1;&#x5668;&#x548C;web&#x5E94;&#x7528;&#x6846;&#x67B6;&#x4E4B;&#x95F4;&#x3002;</p>
<p><strong>uwsgi&#xFF1A;</strong>&#x662F;&#x4E00;&#x79CD;&#x4F20;&#x8F93;&#x534F;&#x8BAE;&#xFF0C;&#x7528;&#x4E8E;&#x5B9A;&#x4E49;&#x4F20;&#x8F93;&#x4FE1;&#x606F;&#x7684;&#x7C7B;&#x578B;&#x3002;</p>
<p><strong>uWSGI&#xFF1A;</strong>&#x662F;&#x5B9E;&#x73B0;&#x4E86;uwsgi&#x534F;&#x8BAE;WSGI&#x7684;web&#x670D;&#x52A1;&#x5668;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x7684;&#x90E8;&#x7F72;&#x65B9;&#x5F0F;&#xFF1A;
nginx + gunicorn + flask</p>
<pre><code class="lang-python"><span class="hljs-comment"># hello.py</span>

<span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> Flask
app = Flask(__name__)
<span class="hljs-decorator">@app.route(&apos;/&apos;)</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">hello</span><span class="hljs-params">()</span>:</span>
    <span class="hljs-keyword">return</span> <span class="hljs-string">&apos;&lt;h1&gt;hello world&lt;/h1&gt;&apos;</span>

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">&apos;__main__&apos;</span>:
    app.run(debug=<span class="hljs-keyword">True</span>)
</code></pre>
<h3 id="&#x4F7F;&#x7528;gunicorn&#xFF1A;">&#x4F7F;&#x7528;Gunicorn&#xFF1A;</h3>
<p>web&#x5F00;&#x53D1;&#x4E2D;&#xFF0C;&#x90E8;&#x7F72;&#x65B9;&#x5F0F;&#x5927;&#x81F4;&#x7C7B;&#x4F3C;&#x3002;&#x7B80;&#x5355;&#x6765;&#x8BF4;&#xFF0C;&#x524D;&#x7AEF;&#x4EE3;&#x7406;&#x4F7F;&#x7528;Nginx&#x4E3B;&#x8981;&#x662F;&#x4E3A;&#x4E86;&#x5B9E;&#x73B0;&#x5206;&#x6D41;&#x3001;&#x8F6C;&#x53D1;&#x3001;&#x8D1F;&#x8F7D;&#x5747;&#x8861;&#xFF0C;&#x4EE5;&#x53CA;&#x5206;&#x62C5;&#x670D;&#x52A1;&#x5668;&#x7684;&#x538B;&#x529B;&#x3002;Nginx&#x90E8;&#x7F72;&#x7B80;&#x5355;&#xFF0C;&#x5185;&#x5B58;&#x6D88;&#x8017;&#x5C11;&#xFF0C;&#x6210;&#x672C;&#x4F4E;&#x3002;Nginx&#x65E2;&#x53EF;&#x4EE5;&#x505A;&#x6B63;&#x5411;&#x4EE3;&#x7406;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x505A;&#x53CD;&#x5411;&#x4EE3;&#x7406;&#x3002;</p>
<p>&#x6B63;&#x5411;&#x4EE3;&#x7406;&#xFF1A;&#x8BF7;&#x6C42;&#x7ECF;&#x8FC7;&#x4EE3;&#x7406;&#x670D;&#x52A1;&#x5668;&#x4ECE;&#x5C40;&#x57DF;&#x7F51;&#x53D1;&#x51FA;&#xFF0C;&#x7136;&#x540E;&#x5230;&#x8FBE;&#x4E92;&#x8054;&#x7F51;&#x4E0A;&#x7684;&#x670D;&#x52A1;&#x5668;&#x3002;</p>
<p>&#x7279;&#x70B9;&#xFF1A;&#x670D;&#x52A1;&#x7AEF;&#x5E76;&#x4E0D;&#x77E5;&#x9053;&#x771F;&#x6B63;&#x7684;&#x5BA2;&#x6237;&#x7AEF;&#x662F;&#x8C01;&#x3002;</p>
<p>&#x53CD;&#x5411;&#x4EE3;&#x7406;&#xFF1A;&#x8BF7;&#x6C42;&#x4ECE;&#x4E92;&#x8054;&#x7F51;&#x53D1;&#x51FA;&#xFF0C;&#x5148;&#x8FDB;&#x5165;&#x4EE3;&#x7406;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x518D;&#x8F6C;&#x53D1;&#x7ED9;&#x5C40;&#x57DF;&#x7F51;&#x5185;&#x7684;&#x670D;&#x52A1;&#x5668;&#x3002;</p>
<p>&#x7279;&#x70B9;&#xFF1A;&#x5BA2;&#x6237;&#x7AEF;&#x5E76;&#x4E0D;&#x77E5;&#x9053;&#x771F;&#x6B63;&#x7684;&#x670D;&#x52A1;&#x7AEF;&#x662F;&#x8C01;&#x3002;</p>
<p>&#x533A;&#x522B;&#xFF1A;&#x6B63;&#x5411;&#x4EE3;&#x7406;&#x7684;&#x5BF9;&#x8C61;&#x662F;&#x5BA2;&#x6237;&#x7AEF;&#x3002;&#x53CD;&#x5411;&#x4EE3;&#x7406;&#x7684;&#x5BF9;&#x8C61;&#x662F;&#x670D;&#x52A1;&#x7AEF;&#x3002;</p>
<h4 id="&#x5B89;&#x88C5;gunicorn">&#x5B89;&#x88C5;gunicorn</h4>
<pre><code>pip install gunicorn
</code></pre><p><strong> &#x67E5;&#x770B;&#x547D;&#x4EE4;&#x884C;&#x9009;&#x9879;&#xFF1A; </strong>&#x5B89;&#x88C5;gunicorn&#x6210;&#x529F;&#x540E;&#xFF0C;&#x901A;&#x8FC7;&#x547D;&#x4EE4;&#x884C;&#x7684;&#x65B9;&#x5F0F;&#x53EF;&#x4EE5;&#x67E5;&#x770B;gunicorn&#x7684;&#x4F7F;&#x7528;&#x4FE1;&#x606F;&#x3002;</p>
<pre><code class="lang-bash"><span class="hljs-variable">$gunicorn</span> -h
</code></pre>
<p><strong> &#x76F4;&#x63A5;&#x8FD0;&#x884C;&#xFF1A;</strong></p>
<pre><code class="lang-bash"><span class="hljs-comment">#&#x76F4;&#x63A5;&#x8FD0;&#x884C;&#xFF0C;&#x9ED8;&#x8BA4;&#x542F;&#x52A8;&#x7684;127.0.0.1::8000</span>
gunicorn &#x8FD0;&#x884C;&#x6587;&#x4EF6;&#x540D;&#x79F0;:Flask&#x7A0B;&#x5E8F;&#x5B9E;&#x4F8B;&#x540D;
</code></pre>
<p><strong> &#x6307;&#x5B9A;&#x8FDB;&#x7A0B;&#x548C;&#x7AEF;&#x53E3;&#x53F7;&#xFF1A;</strong>
-w: &#x8868;&#x793A;&#x8FDB;&#x7A0B;&#xFF08;worker&#xFF09;&#x3002;
-b&#xFF1A;&#x8868;&#x793A;&#x7ED1;&#x5B9A;ip&#x5730;&#x5740;&#x548C;&#x7AEF;&#x53E3;&#x53F7;&#xFF08;bind&#xFF09;&#x3002;</p>
<pre><code class="lang-bash"><span class="hljs-variable">$gunicorn</span> -w <span class="hljs-number">4</span> -b <span class="hljs-number">127.0</span>.<span class="hljs-number">0.1</span>:<span class="hljs-number">5001</span> &#x8FD0;&#x884C;&#x6587;&#x4EF6;&#x540D;&#x79F0;:Flask&#x7A0B;&#x5E8F;&#x5B9E;&#x4F8B;&#x540D;
</code></pre>
<h2 id="&#x5B89;&#x88C5;nginx">&#x5B89;&#x88C5;Nginx</h2>
<pre><code class="lang-bash">$ sudo apt-get install nginx
</code></pre>
<h3 id="nginx&#x914D;&#x7F6E;&#xFF1A;">Nginx&#x914D;&#x7F6E;&#xFF1A;</h3>
<p>&#x9ED8;&#x8BA4;&#x5B89;&#x88C5;&#x5230;/usr/local/nginx/&#x76EE;&#x5F55;&#xFF0C;&#x8FDB;&#x5165;&#x76EE;&#x5F55;&#x3002;</p>
<p>&#x542F;&#x52A8;nginx&#xFF1A;</p>
<pre><code>#&#x542F;&#x52A8;
sudo sbin/nginx
#&#x67E5;&#x770B;
ps aux | grep nginx
#&#x505C;&#x6B62;
sudo sbin/nginx -s stop
</code></pre><p>&#x6253;&#x5F00;/usr/local/nginx/conf/nginx.conf&#x6587;&#x4EF6;</p>
<pre><code>server {
    # &#x76D1;&#x542C;80&#x7AEF;&#x53E3;
    listen 80;
    # &#x672C;&#x673A;
    server_name localhost; 
    # &#x9ED8;&#x8BA4;&#x8BF7;&#x6C42;&#x7684;url
    location / {
        #&#x8BF7;&#x6C42;&#x8F6C;&#x53D1;&#x5230;gunicorn&#x670D;&#x52A1;&#x5668;
        proxy_pass http://127.0.0.1:5001; 
        #&#x8BBE;&#x7F6E;&#x8BF7;&#x6C42;&#x5934;&#xFF0C;&#x5E76;&#x5C06;&#x5934;&#x4FE1;&#x606F;&#x4F20;&#x9012;&#x7ED9;&#x670D;&#x52A1;&#x5668;&#x7AEF; 
        proxy_set_header Host $host; 
    }
}
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../c05/s02.html" class="navigation navigation-prev " aria-label="Previous page: 单元测试"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../c05/s04.html" class="navigation navigation-next " aria-label="Next page: RESTful"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"toggle-chapters":{},"splitter":{},"emphasize":{},"highlight":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book Flask框架 -->
</html>
